var regexEnum = {
	intege:"^-?[1-9]\\d*$",					
	intege1:"^[1-9]\\d*$",					
	intege2:"^-[1-9]\\d*$",					
	num:"^([+-]?)\\d*\\.?\\d+$",			
	num1:"^[1-9]\\d*|0$",					
	num2:"^-[1-9]\\d*|0$",					
	decmal:"^([+-]?)\\d*\\.\\d+$",			
	decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",　　	
	decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",　 
	decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",　
	decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",　　
	decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",　　

	email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$", 
	color:"^[a-fA-F0-9]{6}$",				
	url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$",	
	chinese:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$",					
	ascii:"^[\\x00-\\xFF]+$",				
	zipcode:"^\\d{6}$",						
	mobile:"^(1)[0-9]{10}$",				
	ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$",	//ip地址
	notempty:"^\\S+$",						
	picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$",	
	rar:"(.*)\\.(rar|zip|7zip|tgz)$",								
	date:"^\\d{4}(\\-|\\/|\.)\\d{1,2}\\1\\d{1,2}$",					
	qq:"^[1-9]*[1-9][0-9]*$",				
	tel:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$",	
	username:"^\\w+$",						
	letter:"^[A-Za-z]+$",					
	letter_u:"^[A-Z]+$",					
	letter_l:"^[a-z]+$",					
	idcard:"^[1-9]([0-9]{14}|[0-9]{17})$",	
	ps_username:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D_\\w]+$" 
};

function isTime(str){
	var a = str.match(/^(\d{1,2})(:)?(\d{1,2})\2(\d{1,2})$/);
	if (a == null) {return false;}
	if (a[1]>24 || a[3]>60 || a[4]>60)
	{
		return false;
	}
	return true;
}

function isDate(str){
	var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); 
	if(r==null)return false; 
	var d= new Date(r[1], r[3]-1, r[4]); 
	return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
}

function isDateTime(str){
	var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/; 
	var r = str.match(reg); 
	if(r==null) return false; 
	var d= new Date(r[1], r[3]-1,r[4],r[5],r[6],r[7]); 
	return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]);
}